package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * CollegeNotice entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "College_Notice", schema = "dbo", catalog = "StudentManager")
public class CollegeNotice implements java.io.Serializable {

	// Fields

	private Long collegeNoticeId;
	private College college;
	private ClassInfo classInfo;
	private Timestamp collegeNoticeTime;
	private String collegeNoticeContent;
	private String publisher;

	// Constructors

	/** default constructor */
	public CollegeNotice() {
	}

	/** minimal constructor */
	public CollegeNotice(Long collegeNoticeId, String collegeNoticeContent,
			String publisher) {
		this.collegeNoticeId = collegeNoticeId;
		this.collegeNoticeContent = collegeNoticeContent;
		this.publisher = publisher;
	}

	/** full constructor */
	public CollegeNotice(Long collegeNoticeId, College college,
			ClassInfo classInfo, Timestamp collegeNoticeTime,
			String collegeNoticeContent, String publisher) {
		this.collegeNoticeId = collegeNoticeId;
		this.college = college;
		this.classInfo = classInfo;
		this.collegeNoticeTime = collegeNoticeTime;
		this.collegeNoticeContent = collegeNoticeContent;
		this.publisher = publisher;
	}

	// Property accessors
	@Id
	@Column(name = "College_Notice_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getCollegeNoticeId() {
		return this.collegeNoticeId;
	}

	public void setCollegeNoticeId(Long collegeNoticeId) {
		this.collegeNoticeId = collegeNoticeId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "College_id")
	public College getCollege() {
		return this.college;
	}

	public void setCollege(College college) {
		this.college = college;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Class_id")
	public ClassInfo getClassInfo() {
		return this.classInfo;
	}

	public void setClassInfo(ClassInfo classInfo) {
		this.classInfo = classInfo;
	}

	@Column(name = "College_Notice_Time", length = 23)
	public Timestamp getCollegeNoticeTime() {
		return this.collegeNoticeTime;
	}

	public void setCollegeNoticeTime(Timestamp collegeNoticeTime) {
		this.collegeNoticeTime = collegeNoticeTime;
	}

	@Column(name = "College_Notice_Content", nullable = false)
	public String getCollegeNoticeContent() {
		return this.collegeNoticeContent;
	}

	public void setCollegeNoticeContent(String collegeNoticeContent) {
		this.collegeNoticeContent = collegeNoticeContent;
	}

	@Column(name = "Publisher", nullable = false, length = 20)
	public String getPublisher() {
		return this.publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

}